This invention relates to computer communications in a network environment. More particularly, a system and methods are provided for reducing the amount of network traffic communicated between two computer systems or other computing devices.
In a network computing environment in which one computer system must exchange information with another computer system, the amount of information flowing between the two systems may be quite large. For example, in a client/server architecture in which the client and server cooperate to execute an application for a user, the server may send a great deal of data to the client to keep it populated with relevant, updated information. Similarly, the client may send a steady stream of user actions, requests and new or updated data to the server.
The popularity of network-based applications operating over the Internet or other network, particularly database applications, may thus cause a large amount of network traffic. As the number of users operating such applications grows, the level of network traffic grows commensurately. One system in which two computer systems cooperate via a network to operate a network-based application is described in U.S. Pat. No. 6,073,163, entitled xe2x80x9cMethod and Apparatus for Enabling Web-Based Execution of an Application,xe2x80x9d filed on Jun. 10, 1997 and issued on Jun. 6, 2000.
As the level of network traffic increases, users of an application operated across the network may experience a degradation in its performance. The greater the number of network applications in operation, and the greater the number of clients that must communicate with a server, the greater the impact may be on network performance. The nature of the application can also make a significant impact. Where, for example, a user interface on a client is partially or fully managed by a server (e.g., the placement, size and appearance of windows, buttons or other objects), the amount of data that must be sent from the server to a client may be much greater than if the user interface were fixed or managed by the client. This situation may be frequently encountered when a client is a relatively xe2x80x9cthinxe2x80x9d device having only limited resources (e.g., memory, storage, communication bandwidth).
Compressing a network communication using a standard compression utility may be partially effective in reducing its size, but can provide only limited relief because such utilities are most effective when the information to be compressed contains repeated patterns. A series of network communications between two devices may contain repeated information but may not have the degree of repetition within a single communication that makes a standard compression utility very useful.
Thus, it is desirable to provide a mechanism and method for reducing network traffic between computer systems. It is particularly desirable to reduce the amount and/or size of communications exchanged between two computer systems that cooperate to execute a network-based application.
In one embodiment of the invention a system and methods are provided for decreasing the amount of communication traffic exchanged between two computers or other computing devices by reducing the size of a message sent from one of them to the other.
In this embodiment each computer comprises a message module configured to send and/or receive messages to/from the other computer. Each message module includes a first memory configured to store data values and a second memory configured to store messages previously sent from one of the computers to the other.
In a method of reducing the size of a message in one embodiment of the invention, the sending computer examines data values included in the message. A value has an associated data type that is normally allocated a predetermined amount of space (e.g., number of bytes) in the message. If the value can be adequately represented using a different type that requires less space, then the data type is changed. Special data types may be used to represent smaller or shorter versions of standard data types (e.g., integer, point) and/or specific data values (e.g., Boolean_false may represent Boolean data having a value of false). The computer that receives the message recognizes a special data type and restores the original data type before passing the message onward for higher-level processing.
In another embodiment of the invention another method of reducing the size of a message is provided in which a data values in the message may be replaced by an identifier. In this method, a sending computer buffers or caches, in its first memory, data values (or specific forms of data such as strings) to be sent to a receiving computer. If a data value that is to be sent is already stored in the first memory, then an identifier of the data value (e.g., its index in the buffer) is sent in its place particularly if it uses less space). If not already stored, then the data value may be sent as is, in which case it is stored in the first memory of the sending computer. Upon receipt of an identifier, the receiving computer refers to its first memory to retrieve the appropriate data value based on the received identifier. If a data value is received in its normal form, it is stored in the first memory.
In yet another embodiment of the invention another method of reducing the size of a message is provided in which the contents of a new message are described by their difference(s) from a previous message. In its second memory, a sending computer stores one or more message previously sent to a receiving computer. When a new message is to be sent to the receiving computer, a previous message may be selected and a delta message generated to describe the contents of the new message in relation to the previous message. Multiple delta messages may be generated, each one from a different previous message. A delta message that is smaller than the new message may then be sent in its place. The receiving computer retrieves the previous message from its second memory and, with the delta message, reconstructs the new message.
In one embodiment of the invention a message sent from one computer to another includes a header portion, a body portion and a terminator. The header portion may identify the type of message, a type of object or component on the receiving computer to which the message applies, and/or an identity of a specific object or component. In one alternative embodiment, the header of a delta message also includes an identifier of the previous message used to generate the delta message. The body of a message includes one or more property descriptors, with each descriptor corresponding to one property of an object or component identified in the header. Each descriptor may include multiple fields, such as an identifier of corresponding property, a value associated with (e.g., to be applied to) the property, and a data type associated with the value.